<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .box {
        width: 600px;
        height: 600px;
        border: 1px solid #ccc;
        padding: 20px;
        margin: 0 auto;
      }
      .dog {
        width: 20px;
        height: 20px;
        background-color: #00aabb;
        /* 动画实现 */
        /* 复合属性 */
        animation: move 3s 10s ease-in-out infinite;
      }
      .box:hover .dog {
        /* 动画的播放状态 */
        animation-play-state: paused;
      }
      @keyframes move {
        25% {
          transform: translate(580px);
          border-radius: 50%;
          width: 100px;
          height: 100px;
        }
        50% {
          transform: translate(580px, 580px);
        }
        75% {
          transform: translateY(580px);
          border-radius: 50%;
          background-color: #ff0000;
          width: 50px;
          height: 50px;
        }
      }
    </style>
  </head>
  <body>
    <div class="box">
      <div class="dog"></div>
    </div>
  </body>
</html>
